/*
* Configuration of module: PduR
*
* Created by:   qinminyuan
* Copyright:    (C)  
*
* Configured for (MCU):    MCU
*
* Module vendor:           ArcCore
* Generator version:       01.00
*/


#include "PduR.h"

#if PDUR_CANIF_SUPPORT == STD_ON
#include "CanIf.h"
#endif
#if PDUR_CANTP_SUPPORT == STD_ON
#include "CanTp.h"
#endif
#if PDUR_LINIF_SUPPORT == STD_ON
#include "LinIf.h"
#endif
#if PDUR_COM_SUPPORT == STD_ON
#include "Com.h"
#endif
#if PDUR_DCM_SUPPORT == STD_ON
#include "Dcm.h"
#endif
#if PDUR_J1939TP_SUPPORT == STD_ON
#include "J1939Tp.h"
#endif
#ifdef USE_SOAD
#include "SoAd.h"
#else
#define SOADTP_ID_SOAD_RX 0
#define SOADTP_ID_SOAD_TX 0
#endif
#if(PDUR_ZERO_COST_OPERATION == STD_OFF)
const PduRDestPdu_type PduR_PduRDestination[] = {

    {   //0
        .DataProvision =  PDUR_NO_PROVISION,
        .DestPduId =  DCM_ID_Phys_DiagRx,
        //.TxBufferRef =  NULL,
        .DestModule =  ARC_PDUR_DCM
    },

    {   //1
        .DataProvision =  PDUR_NO_PROVISION,
        .DestPduId =  DCM_ID_Func_DiagRx,
        //.TxBufferRef =  NULL,
        .DestModule =  ARC_PDUR_DCM
    },

    {   //2
        .DataProvision =  PDUR_NO_PROVISION,
        .DestPduId =  CANTP_ID_Phys_DiagTx,
        //.TxBufferRef =  NULL,
        .DestModule =  ARC_PDUR_CANTP
    },

};
    const PduRDestPdu_type * const Phys_DiagRx_PduRDestinations[] = 
{
	&PduR_PduRDestination[0],
	NULL,
};
const PduRDestPdu_type * const Func_DiagRx_PduRDestinations[] = 
{
	&PduR_PduRDestination[1],
	NULL,
};
const PduRDestPdu_type * const Phys_DiagTx_PduRDestinations[] = 
{
	&PduR_PduRDestination[2],
	NULL,
};

const PduRRoutingPath_type Phys_DiagRx_PduRRoutingPath = {//0
    .SduLength =  8,
    .SrcPduId =  CANTP_ID_Phys_DiagRx,
    .SrcModule =  ARC_PDUR_CANTP,
    .PduRDestPdus =  Phys_DiagRx_PduRDestinations
};

const PduRRoutingPath_type Func_DiagRx_PduRRoutingPath = {//1
    .SduLength =  8,
    .SrcPduId =  CANTP_ID_Func_DiagRx,
    .SrcModule =  ARC_PDUR_CANTP,
    .PduRDestPdus =  Func_DiagRx_PduRDestinations
};

const PduRRoutingPath_type Phys_DiagTx_PduRRoutingPath = {//2
    .SduLength =  8,
    .SrcPduId =  DCM_ID_Phys_DiagTx,
    .SrcModule =  ARC_PDUR_DCM,
    .PduRDestPdus =  Phys_DiagTx_PduRDestinations
};

const PduRRoutingPath_type * const PduRRoutingPaths[] = { 
	&Phys_DiagRx_PduRRoutingPath, //0
	&Func_DiagRx_PduRRoutingPath, //1
	&Phys_DiagTx_PduRRoutingPath, //2

    NULL
};  

const PduR_PBConfigType PduR_Config = {
    .PduRConfigurationId =  0,
    .NRoutingPaths =  3,       
    .RoutingPaths =  PduRRoutingPaths,
    .TpBuffers =  NULL,
    .TpRouteBuffers =  NULL
};

#endif //(PDUR_ZERO_COST_OPERATION == STD_OFF)  
    
